<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/extras/spring-security">
<head>
    <meta charset="UTF-8">
    <title>Admin</title>
</head>
<body>
<div class="container">

    <ul class="layui-nav right" lay-filter="">
        <li class="layui-nav-item">
            <a>欢迎你，[[${session.SPRING_SECURITY_CONTEXT.authentication.principal.adminName}]]</a>
            <a th:href="@{/logout}">退出</a>
        </li>

    </ul>

</div>

<div class="left-nav">
    <div id="side-nav">
        <ul id="nav">

            <li>
                <a >
                    <cite>用户管理</cite>
                </a>
                <ul class="sub-menu">
                    <li>
                        <a th:href="@{/admin_teacher_list}">
                            <cite>老师管理</cite>
                        </a>
                    </li>
                    <li>
                        <a th:href="@{/admin_stu_list}">
                            <cite>学生管理</cite>
                        </a>
                    </li>
                    <li sec:authorize="hasRole('ROLE_super')">
                        <a th:href="@{/super_admin_list}">
                            <cite>管理员管理</cite>
                        </a>
                    </li>
                </ul>
            </li>
            <a >
                <cite>课程管理</cite>
            </a>
            <ul class="sub-menu">
                <li>
                    <a th:href="@{/course_list}">
                        <cite>课程管理</cite>
                    </a>
                </li>
                <li>
                    <a th:href="@{/class_list}">
                        <cite>班级管理</cite>
                    </a>
                </li>
                <li>
                    <a th:href="@{/score_list}">
                        <cite>成绩审阅</cite>
                    </a>
                </li>
            </ul>
            </li>
        </ul>
    </div>
</div>

<div class="page-content">
    <div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">
        <ul>
            <li></li>
        </ul>
        <div class="layui-tab-content">
            <a th:href="@{/admin_stu_add}">添加学生</a>

            <table class="user-table">
                <thead>
                <tr>
                    <th>学号</th>
                    <th>姓名</th>
                    <th>性别</th>
                    <th>状态</th>
                </tr>
                </thead>
                <tbody th:each="stu:${session.studentList}">
                <tr>

                    <td th:text="${stu.stuNumber}">1</td>
                    <td th:text="${stu.stuName}">小明</td>
                    <td th:text="${stu.stuSex}">123456</td>
                    <td th:text="${stu.stuStatus}==1?'正常':'禁用'">123456</td>
                    <td class="admin-manage">
                        <a  th:href="@{/stu_revise_jump/{id}(id = ${stu.stuId})}">
                            修改信息
                        </a>
                    </td>
                    <td class="admin-manage">
                        <a  th:href="@{/stu_password_jump/{id}(id = ${stu.stuId})}">
                            修改密码
                        </a>
                    </td>
                    <td>
                        <a  th:href="@{/stu_status/{id}(id = ${stu.stuId})}"  th:text="${stu.stuStatus}==0?'启用':'禁用'">

                        </a>
                    </td>


                </tr>

                </tbody>
            </table>


        </div>
    </div>
</div>
</div>
</body>
</html>